<div class="mod-tit"><a href="#">CÔNG VIỆC</a>
  <span><a href="<?php echo Yii::app()->createUrl('/job/show'); ?>">Xem tất cả</a></span></div>
            <div class=" mod-cont">
            ﻿  <div class="table">
                <table cellpadding="3" cellspacing="3" border="0" width="100%">
                ﻿  <tr>
                      <th width="45%">Tên công việc</th>
                    ﻿  <th width="15%">Giá</th>
                      <th width="15%">Tình trạng</th>
                      <th width="15%">Kết thúc</th>
                  </tr>
                </table>
            ﻿  </div>
                <?php foreach($this->model as $value): ?>
                <div class="table">
                  <table cellpadding="3" cellspacing="3" border="0" width="100%">
                  <tr>
                    <td><a href="index.php?r=job/create/view&id=<?php echo $value['idjob']; ?>"><?php echo $value['name']; ?> </a></td>
                    <td width="15%" align="center"><?php echo $value['minmoney']; ?></td>
                    <td width="15%" align="center"><?php 
                      if ($value['status'] == 1){
                        echo "Chấp nhận ngay";
                      }elseif ($value['status'] == 2) {
                        echo "Chờ nhấp nhận";
                      }else{
                        echo "Đã chấp nhận";
                      }
                     ?></td>
                <?php if(Yii::app()->getModule('job')->timeend(date("Y-m-d H:i:s"),$value['timeend']) <= 0): ?>
                  <td width="15%" align="center" class="time-over"><?php echo Yii::app()->getModule('job')->time_diff(date("Y-m-d H:i:s"),$value['timeend']); ?>     
                    <img src="<?php echo Yii::app()->request->baseUrl; ?>/themes/bjoco/images/time-over.gif" border="0" align="baseline" /></td></tr>
                  <?php else: ?>
                  <td width="15%" align="center"><?php echo Yii::app()->getModule('job')->time_diff(date("Y-m-d H:i:s"),$value['timeend']); ?>     
                    </td></tr>
                  <?php endif; ?>
                </table>
            ﻿  </div>
                <?php endforeach; ?> 
            </div>